<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
        <title>发表提问-品购网</title>
        <link href="__PUBLIC__/css/hangye.css" rel="stylesheet" type="text/css" />
        <link href="__PUBLIC__/css/person.css" rel="stylesheet" type="text/css" />
        <link href="__PUBLIC__/css/comm.css" rel="stylesheet" type="text/css" />
        <link href="__PUBLIC__/css/panel.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="__PUBLIC__/js/ckeditor/ckeditor.js"></script>
        <script type="text/javascript" href="__PUBLIC__/js/personquestion.js"></script>
        <script src="__PUBLIC__/js/jquery.js" type="text/javascript"></script>
    </head>
    <body>
	   <div class="containner">
        <include file="Index:header"/>
        <!--导航结束--> 
    <div id="myshare" style="position:absolute;top:0px;margin:auto;z-index:299"></div>
    <div class="body-center">
<!--        <div class="path">
				首页 >> 个人页面 >> 发表提问
        </div>-->
        <div class="w_tithead"> <strong>您当前的位置是： </strong><a href="__APP__">品购网首页</a><a  href="#">个人信息</a>发表提问</div>
        <div class="persionquestion_title">发表提问</div>
        <div class="contents">
            <div class="menu">
                <include file="User:user_menu"/>

            </div>
            <div class="content">

                <div id="addtextarea" class="addinput">
                    <form action="__APP__/Home/Question/add" method="post" onsubmit="return checkForm();">
                        <!--标题：<input type="text" name="title" id="questiontitle" size="50">-->
                        <textarea name="content" id="content"></textarea>
                        <br>
                        <input type="image" src="__PUBLIC__/images/submit.gif" align="right" style="cursor:pointer;">
                    </form>
                </div>

            </div>
        </div>
    </div>
<include file="Index:bottom" />
<!--页尾部分-->
</div>
</body>
</html>


<script>   
    
    function checkForm(){
        // var title = $("#questiontitle").val();
        var content = $("#content").val();
        //alert(content);
        /* if(title.length<2 || title.length > 100){
            alert('标题输入非法');
            return false;
        }*/
        
        content = DelHtml(content);
        if(content.length < 5){
            alert('提问正文输入非法');
            return false;
        }
        
    }
    function DelHtml(Word){
        a = Word.indexOf("<");
        b = Word.indexOf(">");
        len = Word.length;
        c = Word.substring(0, a);
        if(b == -1)
            b = a;
        d = Word.substring((b + 1), len);
        Word = c + d;
        tagCheck = Word.indexOf("<");
        if(tagCheck != -1)
            Word = DelHtml(Word);
        return Word;
    } 
    CKEDITOR.replace( 'content',{skin : 'kama'});
</script>